package logic

import (
	"context"
	"tourism-app/common/proto/user"
	"tourism-app/service/server"
)

type ServerUser struct {
	user.UnimplementedUserServer
}

func (s ServerUser) Login(ctx context.Context, in *user.LoginReq) (*user.LoginResp, error) {
	login, err := server.Login(in)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s ServerUser) ScenicToEs(ctx context.Context, in *user.ScenicToEsReq) (*user.ScenicToEsResp, error) {
	es, err := server.ScenicToEs(in)
	if err != nil {
		return nil, err
	}
	return es, nil
}
func (s ServerUser) SearchScenic(ctx context.Context, in *user.SearchScenicReq) (*user.SearchScenicResp, error) {
	scenic, err := server.SearchScenic(in)
	if err != nil {
		return nil, err
	}
	return scenic, nil
}
func (s ServerUser) ScenicItem(ctx context.Context, in *user.ScenicItemReq) (*user.ScenicItemResp, error) {
	scenic, err := server.ScenicItem(in)
	if err != nil {
		return nil, err
	}
	return scenic, nil
}
func (s ServerUser) CreateOrder(ctx context.Context, in *user.CreateOrderReq) (*user.CreateOrderResp, error) {
	order, err := server.CreateOrder(in)
	if err != nil {
		return nil, err
	}
	return order, nil
}
func (s ServerUser) RealName(ctx context.Context, in *user.RealNameReq) (*user.RealNameResp, error) {
	realname, err := server.RealName(in)
	if err != nil {
		return nil, err
	}
	return realname, nil
}
func (s ServerUser) UpdateOrderStatus(ctx context.Context, in *user.UpdateOrderStatusReq) (*user.UpdateOrderStatusResp, error) {
	status, err := server.UpdateOrderStatus(in)
	if err != nil {
		return nil, err
	}
	return status, nil
}
func (s ServerUser) OrderList(ctx context.Context, in *user.OrderListReq) (*user.OrderListResp, error) {
	list, err := server.OrderList(in)
	if err != nil {
		return nil, err
	}
	return list, nil
}
func (s ServerUser) Refund(ctx context.Context, in *user.RefundReq) (*user.RefundResp, error) {
	refund, err := server.Refund(in)
	if err != nil {
		return nil, err
	}
	return refund, nil
}
